pp108 : Generating Process Platform Web Service Operations for External Web Services

Generating Process Platform Web Service Operations for External Web Services

This topic describes the procedure to generate Process Platform Web service operations for external Web services.

Before you begin this task:

Web services are extensively used in the Process Platform. Since Web services are standards-based and have a well defined contract, they play an important role in modelling the application in the design time and provide a simple way to invoke them in the runtime. Web services can be generated not only on standard Process Platform models such as BPM or Database tables but also on external Web services to make them available on the Process Platform. The following procedure explains how to use the wizard to generate Web services on top of external services.

  1. Access Web Service ( ) to generate Web service operations. The Web services Generation Wizard appears, displaying Untitled Web Service - Web Service page.
  2. Select Import WSDL option from the Select the Source drop-down list.
  3. Type the appropriate name and description in the respective fields of the wizard and click Next. The next page of the Web services Generation Wizard appears.
  4. Type the URL that points to the WSDL in the URL field (for example, https://secure.jajah.com/api/SMSService.asmx?wsdl).

    Note:
    If you want to use an external Web service from Process Platform Process Factory (CPF), follow the below procedure to obtain its URL.

    1. Open the MashApps Composer window.
    2. Select Build Web services > All WebServices. It lists all available Web services.
    3. Double-click the required Web service to view its details.
    4. Copy the URL provided in the WSDL URL field.
  5. If reading the WSDL requires authentication, select the Authentication Details option and type the credentials. These login details will allow you to read the WSDL.
  6. Click Show Services. To search the business entity or business service in the UDDI registry, click .

    Note:

    • If the WSDL XML is invalid or returning content with invalid Content-Type property, the notification message "WSDL/Schema document is invalid or not present. Make sure the server is returning the content in proper format" is displayed.
    • If a request is unsuccessful, the message "Could not read the HTTP URL. The server has returned HTTP Error <code>" is displayed at times.
    • To access an external Web service from the local intranet zone, you must change the security settings in your browser.
  7. Select the required WSDL type from the WSDL Type list.

    Note:
    Types of WSDLs are as follows:

    If the WSDL is

    Then

    Implementation WSDLs

    You can invoke the Web service operations directly, since the implementation is readily available for each operation. Hence, for these WSDLs, you can select the required Web service operations and proceed with the generation of Web services.

    Interface WSDLs

    In this type of WSDLs, the Web service operations do not have an implementation. Hence, you must implement all the Web service operations on the Process Platform. To implement Web service operations, you need to select the Contract check box in the Properties sheet, while defining the properties of the business process model. To generate Web service operations for this type, the operations under all the Port Types are selected by default and you must necessarily generate operations for all of them.

     
  8. Select a Port Type from the Web Services drop-down list. The Web Service Operations defined in the WSDL for the selected port type are displayed in the Web Service Operations list.
  9. Namespace is automatically picked up from the WSDL.
  10. Click Finish. The Web service is listed in the project menu.

    Note:

    • If the imported Web service definition sets exist in the workspace, they will be updated with the latest content. If they are not found in the workspace, the newly created imported definition sets will be stored in the importedwsdls folder under the project.
    • If the imported schemas exist in the workspace, they will be updated with the latest content. If they are not found in the workspace, the newly created schemas will be stored in the importedschemas folder under the project.
    • However, there will be no change in the view of the definition set hierarchy as the imported schemas and WSDLs are displayed under the definition set.
  11. Attach a service group to a Web service interface.

    Note:

    • If you do not specify the organization, the Web service gets published to the default organization set for the authenticated user.
    • You can only consume WS-I Basic Profile compliant Web services.

    Caution:
    It is recommended not to use the Web service Generator for generating Web services for internal (Process Platform) Web services. This can cause a namespace to be attached to two different Service Groups (example LDAP and UDDI), which may result in request being routed to the wrong Service Group.

    After you complete this task:
    Publish the Web service.